import {reqCategoryList} from "@/api";

const state = {
    categoryList :[]
}
const mutations = {
    SST_CATEGORYLIST_STATE(state,payload){
        state.categoryList = payload.categoryList;
    }
}

const actions = {
    async getCategoryList({ commit}) {
        const result = await reqCategoryList()
        commit("SST_CATEGORYLIST_STATE", { categoryList: result })
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions,
  };